/*
 * @Author: Administrator
 * @Date:   2017-12-15 15:21:24
 * @Last Modified by:   Administrator
 * @Last Modified time: 2017-12-19 15:18:08
 */
import React from 'react'
import { StaticRouter ,Route} from 'react-router-dom'
import { Provider, useStaticRendering } from 'mobx-react'
import PcRouer from './router/pc_router'
import MobileRouter from './router/mobile_router'
import { createStore, createUserStore } from './store/app_state'
// import PCIndex from './test'
useStaticRendering(true)
export default (stores , userStore,context={}, url) => {
  return(
    <Provider {...stores} userStore={userStore}>
      <StaticRouter context={context} location={url}>
        <PcRouer />
      </StaticRouter>
    </Provider>
  )
}
const MobileApp = (stores ,userStore, context={}, url) => {
  return(
    <Provider {...stores} userStore={userStore}>
      <StaticRouter context={context} location={url}>
        <MobileRouter />
      </StaticRouter>
    </Provider>
  )
  // return(
  //     <div>sdfdssdf</div>
  // )
}
export {
  createStore,
  MobileApp,
  createUserStore,
}
